<?php
namespace Home\Controller;
use Think\Controller;
class textController extends Controller {
    public function index(){
        $answerId = I('get.answerId');
        if($answerId == '') $answerId = '0';
        $this->assign('answerId', $answerId);
        $this->assign('isPC', json_encode(isPC()));
        $this->show(render($this->fetch()));
    }

    public function getData(){
        if(IS_AJAX){
            $answerId = I('post.answerId');
            $data = D('zhihu')->getRandom($answerId);
            $this->ajaxReturn($data);
        }
    }
}

?>